define(['jquery','mage/mage','jquery/jquery.cookie'],function($){'use strict';var CookieHelper=function(){this.defaults={expires:null,path:'/',domain:null,secure:false,lifetime:null};function lifetimeToExpires(options,defaults){var expires,lifetime;lifetime=options.lifetime||defaults.lifetime;if(lifetime&&lifetime>0){expires=options.expires||new Date();return new Date(expires.getTime()+lifetime*1000);} return null;} this.set=function(name,value,options){var expires,path,domain,secure;options=$.extend({},this.defaults,options||{});expires=lifetimeToExpires(options,this.defaults)||options.expires;path=options.path;domain=options.domain;secure=options.secure;document.cookie=name+'='+encodeURIComponent(value)+ (expires?'; expires='+expires.toUTCString():'')+ (path?'; path='+path:'')+ (domain?'; domain='+domain:'')+ (secure?'; secure':'');};this.get=function(name){var arg=name+'=',aLength=arg.length,cookie=document.cookie,cLength=cookie.length,i=0,j=0;while(i